package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaRegitrarJugador extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JTextField txtnivel;
	private JLabel lblnivel;
	private JButton btnsalir;
	private JButton btnguardar;
	private JLabel jLabel1;
	private JTextField txttiempo;
	private JTextField txtpuntaje;
	private JTextField txtnombre;
	private JLabel lbltiempo;
	private JLabel lblpuntaje;
	private JLabel lblnombre;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VentanaRegitrarJugador inst = new VentanaRegitrarJugador();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaRegitrarJugador() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Registrar Jugador");
			this.setFont(new java.awt.Font("Bitstream Charter",1,14));
			getContentPane().setForeground(new java.awt.Color(0,255,0));
			getContentPane().setBackground(new java.awt.Color(160,32,240));
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setLayout(null);
				jPanel1.setPreferredSize(new java.awt.Dimension(390, 187));
				jPanel1.setForeground(new java.awt.Color(255,255,255));
				jPanel1.setBackground(new java.awt.Color(255,255,255));
				{
					lblnombre = new JLabel();
					jPanel1.add(lblnombre);
					lblnombre.setText("Nombre:");
					lblnombre.setBounds(43, 64, 71, 15);
					lblnombre.setFont(new java.awt.Font("Bitstream Charter",1,14));
					lblnombre.setForeground(new java.awt.Color(0,0,255));
				}
				{
					lblpuntaje = new JLabel();
					jPanel1.add(lblpuntaje);
					lblpuntaje.setText("Puntaje:");
					lblpuntaje.setBounds(44, 98, 71, 15);
					lblpuntaje.setFont(new java.awt.Font("Bitstream Charter",1,14));
					lblpuntaje.setForeground(new java.awt.Color(0,0,255));
				}
				{
					lbltiempo = new JLabel();
					jPanel1.add(lbltiempo);
					lbltiempo.setText("Tiempo:");
					lbltiempo.setBounds(44, 130, 60, 15);
					lbltiempo.setFont(new java.awt.Font("Bitstream Charter",1,14));
					lbltiempo.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txtnombre = new JTextField();
					jPanel1.add(txtnombre);
					txtnombre.setBounds(110, 57, 86, 22);
					txtnombre.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtnombre.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txtpuntaje = new JTextField();
					jPanel1.add(txtpuntaje);
					txtpuntaje.setBounds(111, 91, 87, 22);
					txtpuntaje.setEnabled(false);
					txtpuntaje.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtpuntaje.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txttiempo = new JTextField();
					jPanel1.add(txttiempo);
					txttiempo.setBounds(110, 127, 88, 22);
					txttiempo.setEnabled(false);
					txttiempo.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txttiempo.setForeground(new java.awt.Color(0,0,255));
				}
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
					jLabel1.setText("Datos del Jugador.");
					jLabel1.setBounds(133, 12, 145, 15);
					jLabel1.setFont(new java.awt.Font("Bitstream Charter",1,16));
					jLabel1.setForeground(new java.awt.Color(0,0,255));
				}
				{
					btnguardar = new JButton();
					jPanel1.add(btnguardar);
					btnguardar.setText("Guardar");
					btnguardar.setBounds(249, 69, 72, 22);
					btnguardar.setFont(new java.awt.Font("Bitstream Charter",1,14));
					btnguardar.setForeground(new java.awt.Color(0,0,0));
				}
				{
					btnsalir = new JButton();
					jPanel1.add(btnsalir);
					btnsalir.setText("Salir");
					btnsalir.setBounds(249, 102, 72, 22);
					btnsalir.setFont(new java.awt.Font("Bitstream Charter",1,14));
					btnsalir.setForeground(new java.awt.Color(0,0,0));
				}
				{
					lblnivel = new JLabel();
					jPanel1.add(lblnivel);
					lblnivel.setText("Nivel:");
					lblnivel.setBounds(44, 167, 50, 15);
					lblnivel.setFont(new java.awt.Font("Bitstream Charter",1,14));
					lblnivel.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txtnivel = new JTextField();
					jPanel1.add(txtnivel);
					txtnivel.setBounds(112, 163, 86, 22);
					txtnivel.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtnivel.setForeground(new java.awt.Color(0,0,255));
					txtnivel.setEnabled(false);
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void addListener(ActionListener actionListener) {

		btnguardar.addActionListener(actionListener);
		btnsalir.addActionListener(actionListener);		
	}
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	

	public String getNombre() {
		return txtnombre.getText();
	}
	
	public String getTiempo()
	{
		return txttiempo.getText();
	}
	public String getPuntaje()
	{
		return txtpuntaje.getText();
	}
	public String getNivel()
	{
		return txtnivel.getText();
	}

	private VentanaPersonalizado ventanaPersonalizado;


}
